package com.situ.mall.api.user;

import com.situ.mall.common.util.Result;
import com.situ.mall.pojo.entity.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "user-service")
public interface UserClient {
	
	/**
	 * 根据id查询用户
	 * @return
	 */
	@GetMapping("/user/selectById/{id}")
	Result<User> selectById(@PathVariable Long id);
	
	@PutMapping("/user/updateSelf")
	Result updateSelf(@RequestBody User user);
	
}
